﻿#ifndef _THREADPOOL_H_
#define _THREADPOOL_H_
#include"main/Inc/Phoenix.h"
#include "ui_quicreator.h"
#include<memory>
#include <QPixmap>
#include<QImage>
#include <QDebug>
#include<QMutex>

using namespace std;
using namespace cv;
class QMyRunnable : public QObject
{
    Q_OBJECT
public:
    QMyRunnable(Ui::QUICreator *UI, shared_ptr<Phoenix> phoenix)
    {
        this->m_ui = UI;
        this->m_phoenix =phoenix;
    }
private:
    QImage cvMat_to_QImage(const cv::Mat &mat );
    shared_ptr<Phoenix> m_phoenix;
    Ui::QUICreator *m_ui;
    QMutex _mutex;
public slots:
    void showImage(Mat src);
    void showImageBottom(Mat src);

signals:
    void printImgUp(QPixmap pixMap);
    void printImgBottom(QPixmap pixMap);
};

#endif
